<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户注册</title>
</head>
<body>
<h1>用户注册</h1>

<!-- 错误信息提示 -->
<div th:if="${error}" style="color: red;">
    <p th:text="${error}"></p>
</div>

<form th:action="@{/signup}" method="post">
    <div>
        <label for="username">用户名:</label>
        <input type="text" id="username" name="username" required>
    </div>
    <div>
        <label for="password">密码:</label>
        <input type="password" id="password" name="password" required>
    </div>
    <button type="submit">注册</button>
</form>

<p>已有账号？<a href="/signin">立即登录</a></p>
</body>
</html>